let STATUSMAP = createEnum({
    0: ['0', '服务类'],
    1: ['1', '康乐类'],
    2: ['2', '生命类'],
    3: ['3', '体能类'],
    4: ['4', '学艺类']
});
function createEnum(definition) {
    const valueMap = {};
    const descMap = {};
    for (const key of Object.keys(definition)) {
        const [value, desc] = definition[key];
        valueMap[key] = value;
        descMap[value] = desc;
    }
    return {
        ...valueMap,
        getDesc(key) {
            return (definition[key] && definition[key][1]) || '无';
        },
        getDescFromValue(value) {
            return descMap[value] || '无';
        }
    }
}
export default STATUSMAP;